import React from 'react';
import { BASE_ACTION_2 } from '../redux/action';
import { connect } from 'react-redux';

const Child = ({ testP, changeTestP }, context) => {
  console.log('Child render');
  return (
    <p onClick={changeTestP}>
      test{testP}
    </p>
  );
};
export default connect(state => state, dispatch => ({
  changeTestP: () => {
    dispatch({ type: BASE_ACTION_2 });
  },
}))(React.memo(Child));